<template>
  <div class="home_map">
    <div id="container"></div>
  </div>
</template>

<script>
import MapLoader from "../../assets/js/AMap.js";
import AMap from "../../assets/js/AMap.js";
export default {
  props: {},
  data() {
    return {
      map: null,
    };
  },
  methods: {},
  components: {},
  mounted() {
    let that = this;
    MapLoader().then(
      (AMap) => {
        console.log("地图加载成功");
        that.map = new AMap.Map("container", {
          // center: [117.000923, 36.675807],
          center: [113.687202,34.810331],
          zoom: 19,
          resizeEnable: true,
        });
      },
      (e) => {
        console.log("地图加载失败", e);
      }
    );
  },
};
</script>

<style scoped lang="less">
.home_map {
  height: 100%;
  #container {
    height: 6.05rem;
  }
}
</style>

